 <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js"></script>
</head>
<body>
<!--
<div ng-app="">
  <p>名字 : <input type="text" ng-model="name"></p>
  <h1>Hello {{name}}</h1>
</div>
-->

<div ng-app="" ng-init="names=[
{name:'Jani',country:'Norway'},
{name:'Hege',country:'Sweden'},
{name:'Kai',country:'Denmark'}];names2=['Jani','Hege','Kai']">
<p>名字 : <input type="text" ng-model="n"></p>
  <h1>Hello {{n}}</h1>
<p>名字 : <input type="text" ng-model="m"></p>
  <h1>Hello {{n}}</h1>
<p>循环对象:</p>
<ul>
  <li ng-repeat="x in names">
  {{ x.name + ', ' + x.country }}</li>
  
</ul>
 <p>使用 ng-repeat 来循环数组</p>
  <ul>
    <li ng-repeat="x in names2">
      {{ x }}
    </li>
  </ul>
</div>

</body>
</html> 